﻿namespace OasisCiq.Xpil
{
    using System.Collections.Specialized;
    using CommonTypes;
    using External;
    using XS;

    public class ElectronicAddressIdentifier : CTString, IDataQualityGroup, IExtendedAttributes
    {
        public ElectronicAddressIdentifier(string value) 
            : base(value)
        {
        }

        /// <summary>
        /// Type of electronic address identifier
        /// </summary>
        public virtual ElectronicAddressIdentifierTypeList Type { get; set; }

        /// <summary>
        /// Status of the entity. e.g. Old, Current, Inactive, Active, etc
        /// </summary>
        public virtual StatusList Status { get; set; }

        /// <summary>
        /// Usage of electronic address identifier. e.g. business, personal
        /// </summary>
        public virtual ElectronicAddressIdentifierUsageList Usage { get; set; }

        /// <summary>
        /// An electronic address identifier is usually stored 
        /// (and probably exchanged) in conjunction with a label which 
        /// is typically displayed and the URL/electronic 
        /// identifier just links that label.
        /// </summary>
        public virtual CTString Label { get; set; }

        /// <summary>
        /// This attribute indicates what level of trust can be given to the parent element.
        /// Omit this attribute if the data quality is unknown. If the data quality is known,
        /// the value is "Valid, else "InValid"
        /// </summary>
        public virtual DataQualityTypeList DataQualityType { get; set; }

        /// <summary>
        /// Date the data quality is valid from
        /// </summary>
        public virtual XSDateTime ValidFrom { get; set; }

        /// <summary>
        /// Date the data quality is valid to
        /// </summary>
        public virtual XSDateTime ValidTo { get; set; }

        public virtual NameValueCollection ExtendedAttributes { get; set; }
    }
}
